package top.hours48.ddbearapi.handler;

import org.springframework.stereotype.Component;
import top.hours48.ddbearapi.constant.PageNameK;
import top.hours48.ddbearapi.model.PageResult;
import top.hours48.ddbearapi.model.admin.AuthUserMO;
import top.hours48.ddbearapi.model.config.MenuMO;
import top.hours48.ddbearapi.model.role.RoleMO;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Component
public class AdminHandler {

    public PageResult<AuthUserMO> queryAuthUsers() {
        List<AuthUserMO> authUsers = List.of(
                new AuthUserMO(1, "guxx", "gxx", "guxx@163.com", new Date(), new Date(), true, "123", "456"),
                new AuthUserMO(2, "惠普产品", "惠普", "hupu@163.com", new Date(), new Date(), true, "123", "6789")
        );

        PageResult<AuthUserMO> pageResult = PageResult.buildPageResult(0, 100, authUsers);

        return pageResult;

    }

    public RoleMO queryUserRole(int roleId) {
        return  new RoleMO(0, new Date(), "只能查看及操作商品", 1, "商品管理员", 0, 1);
    }

}
